package com.yb0os1.builder;

public class Main {
    public static void main(String[] args) {
        /*User yb0os1 = User.builder().name("yb0os1").age(18).build();
        User tom = User.builder().name("Tom").age(17).build();
        //
        User.Builder builder1 = User.builder().name("Bob");
        User.Builder builder2 = builder1.age(20);*/
        System.out.println(SQL.select("name", "age")
                .from("user")
                .where(SQL.whereBulider()
                        .where("id = 1")
                        .and("age = 18")
                        .build())
                .build());
        System.out.println(SQL.update()
                .table("user")
                .set(SQL.setBulider()
                        .set("name", "yb0os1")
                        .set("age", "18")
                        .build()
                ).where(SQL.whereBulider()
                        .where("id = 1")
                        .and("age = 18")
                        .or("name = 'yb0os1'")
                        .build())
                .build());

        //insert into user () values()
        System.out.println(SQL.insert("user")
                .add(SQL.insertBuilder()
                        .add("name", "yb0os1")
                        .add("age", "18")
                        .build()
                )
                .build());
    }
}
